package top.airprogram.user.service;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import top.airprogram.user.dao.StudentMapper;
import top.airprogram.user.dao.TeacherMapper;
import top.airprogram.user.entity.Student;
import top.airprogram.user.entity.Teacher;

/**
 * Created by Riven on 2017/7/24.
 */
@Service("userServiceImpl")
public class UserServiceImpl implements UserService {
    @Autowired
    private StudentMapper studentMapper;
    @Autowired
    private TeacherMapper teacherMapper;
    
    @Override
    @Transactional
    public void insertStudentAndTeacher(Student student, Teacher teacher) {
        studentMapper.insert(student);

        teacherMapper.insert(teacher);
    }




}
